import { Logger } from './logger';
import express, { Express } from 'express';
export class NestApplication {
  // 在其内部私有化一个Express实例
  private readonly app: Express = express();
  constructor(protected readonly module) {}
  //  初始化方法，用于初始化应用程序的中间件和路由
  async init() {}
  async listen(port: number) {
    await this.init();
    console.log(port);
    // 启动 Express 应用程序并监听指定端口
    this.app.listen((port) => {
      Logger.log(`Application listening on port ${port}`, 'NestApplication');
    });
  }
}
